#include <bits/stdc++.h>
#include <unordered_set>
using namespace std;
// 个别案例不能通过
int main()
{
    int n;
    cin >> n;
    unordered_set<int> friends;
    for (int i = 1; i <= n; i++)
    {
        int k;
        cin >> k;
        for (int j = 0; j < k; j++)
        {
            int id;
            cin >> id;
            if (k != 1)
                friends.insert(id);
        }
    }

    int m;
    cin >> m;
    vector<int> res;
    for (int i = 1; i <= m; i++)
    {
        int usrId;
        cin >> usrId;
        if (friends.find(usrId) == friends.end())
        {
            bool flag = false;
            for (auto &r : res)
                if (r == usrId)
                {
                    flag = true;
                    break;
                }
            if (!flag)
                res.push_back(usrId);
        }
    }
    if (res.size() == 0)
        cout << "No one is handsome" << endl;
    else
    {
        for (int i = 0; i < res.size() - 1; i++)
        {
            cout << res[i] << " ";
        }
        cout << res[res.size() - 1] << endl;
    }
    return 0;
}